countToCase = function(x, countcol = "Freq"){
  idx = rep.int(seq_len(nrow(x)), x[[countcol]])
  x[[countcol]] = NULL
  x[idx,]
}